import React, { useState } from 'react';

const Counter = () => {
  const [count, setCount] = useState(0);

  return (
    <div>
      count: {count}
      <button type="button" onClick={() => setCount(c => c + 1)}>add</button>
    </div>
  );
};

export { Counter };

export default Counter;